package com.sprouting.personal.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sprouting.personal.dao.DatabaseBackupDao;
import com.sprouting.personal.model.entity.DatabaseBackup;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 数据库备份表
 *
 * @author ：LX（长沙麓谷）
 * @date 创建时间： 2023/1/29 13:31
 */
@Service
@Slf4j
public class DatabaseBackupService extends ServiceImpl<DatabaseBackupDao, DatabaseBackup> {

    @Resource
    private DatabaseBackupDao databaseBackupDao;

    /**
     * 获取最新一条的备份数据
     * @return
     */
    public DatabaseBackup getBackLatest() {
        return databaseBackupDao.getBackLatest();
    }
}
